/**
 * @file dial_switch.h
 *
 */
#ifndef DIAL_SWITCH_H
#define DIAL_SWITCH_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/

#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lvgl.h"
#include "lv_watch_conf.h"

#else
#include "../../../lvgl/lvgl.h"
#include "../../../lv_watch_conf.h"

#endif

#if USE_LV_WATCH_DIAL_SWITCH != 0

/*********************
 *      DEFINES
 *********************/

/**********************
 *      TYPEDEFS
 **********************/
typedef struct {
    watch_dial_type_t dial_type;
    bool configurable;
    char conf_file_path[WATCH_MAX_PATH_LEN];
    char preview_path[WATCH_MAX_PATH_LEN];
    char name[WATCH_MAX_DIAL_NAME_LEN];
} dial_conf_t;

typedef struct
{
    uint8_t dial_cnt;
    lv_ll_t dials;
} dial_list_t;

typedef struct {
    lv_watch_obj_ext_t lv_watch_obj;     /*Ext. of ancestor*/
    /*New data for this type */
    uint8_t psm;
    uint8_t body_padding_inner;
    uint8_t append_width;
    lv_coord_t move_width;
    int8_t cur_img_id;
    watch_dial_type_t dail_cur_type;
    uint8_t img_cnt;
    uint8_t del_activity_en: 1;
    lv_obj_t ** imgs;
} lv_dail_switch_obj_ext_t;

/**********************
 * GLOBAL PROTOTYPES
 **********************/
lv_obj_t * dial_switch_create(lv_obj_t * activity_obj, uint8_t psm);
void dial_switch_destroy(void);
void dial_switch_create_btn_action(lv_obj_t * btn, lv_event_t event);
/**********************
 *      MACROS
 **********************/

#endif /*USE_LV_WATCH_DIAL_SWITCH*/

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /*DIAL_SWITCH_H*/
